﻿using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Text;

namespace Tsual.DataPipeline
{
    [JsonConverter(typeof(StringEnumConverter))]
    public enum PipelineReadPolicy
    {
        /// <summary>
        /// forward query, reverse setting
        /// </summary>
        CacheMode,
        /// <summary>
        /// only forward query
        /// </summary>
        ReadOnly,
        /// <summary>
        /// forward query, forward setting
        /// </summary>
        PipeReadDepipeSet,
        /// <summary>
        /// forward query, forward setting all pipe
        /// </summary>
        PipeReadAllSet,
    }
    [JsonConverter(typeof(StringEnumConverter))]
    public enum PipelineWritePolicy
    {
        /// <summary>
        /// forward setting
        /// </summary>
        Forward,
        /// <summary>
        /// reverse setting
        /// </summary>
        Reverse
    }
    [JsonConverter(typeof(StringEnumConverter))]
    public enum DataPipeReadResultEnum
    {
        Success,
        Error,
        Skip,
        Notfound
    }
    [JsonConverter(typeof(StringEnumConverter))]
    public enum DataPipeWriteResultEnum
    {
        Success,
        Error,
        Skip
    }
    [JsonConverter(typeof(StringEnumConverter))]
    public enum DataPipeEnum
    {
        Read,
        Write,
        All
    }
    [JsonConverter(typeof(StringEnumConverter))]
    public enum DataPipelineExcutionStatus
    {
        NotStart,
        Working,
        Success,
        Error,
        NoResult
    }
}
